package com.gxsyh.nantie.permission.provider.domain;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

/**
 * @email yom535@outlook.com
 * @author: 刘锋嘉(Liu Fengjia)
 * @date: 2020/1/14
 * @time: 17:38
 * @Description: 
 */
@Data
@Table(name = "tb_user")
public class TbUser implements Serializable {
    /**
     * ID
     */
    @JsonSerialize(using= ToStringSerializer.class)
    @Id
    @Column(name = "id")
    @GeneratedValue(generator = "JDBC")
    private Long id;

    /**
     * 用户名
     */
    @Column(name = "username")
    private String username;

    /**
     * 工号
     */
    @Column(name = "job_number")
    private String jobNumber;

    /**
     * 真实姓名
     */
    @Column(name = "`name`")
    private String name;

    /**
     * 密码，加密存储
     */
    @Column(name = "`password`")
    private String password;

    /**
     * 补贴状态0是没有补贴，1是有补贴
     */
    @Column(name = "subsidy_status")
    private Integer subsidyStatus;

    /**
     * 备注
     */
    @Column(name = "info")
    private String info;

    /**
     * 账户是否启用：0是不启用1是启用
     */
    @Column(name = "user_status")
    private Integer userStatus;

    /**
     * 刷新token
     */
    @Column(name = "refresh_token")
    private String refreshToken;

    /**
     * 手机号码
     */
    @Column(name = "phone")
    private String phone;

    /**
     * 创建时间
     */
    @Column(name = "created")
    private Date created;

    /**
     * 修改时间
     */
    @Column(name = "updated")
    private Date updated;

    private static final long serialVersionUID = 1L;
}